// log.h
// Copyright (C) 2008 Sam Bateman
// samuel.bateman@gmail.com
//
// This file is part of DVD On Fire.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

//! @file log.h
//! @author Sam Bateman
//! @brief Header file for the Log class.

#ifndef _YBJ_DOF_LOG_H
#define _YBJ_DOF_LOG_H

#include <string>

namespace dvdonfire
{
    namespace lib
    {
        // class Log {{{
        //! @brief Logging system.
        //!
        //! Handles everything related to logging information to a file.
        class Log
        {
        public:
            //! @brief Log levels.
            //!
            //! Levels of severity that can be passed to log().
            enum Level {
                DEBUG,
                INFO,
                WARNING,
                ERROR
            };

            // constructor and destructor
            Log(const std::string& dir);
           ~Log();

            // logging functions
            void log(const std::string& who, const std::string& message,
                     Level severity);

        private:
            // implementation
            struct Impl;
            Impl *impl;
        };
        // }}}
    }
}

#endif  // _YBJ_DOF_LOG_H
